HP-35 Calculator Living in an Adafruit Macropad RP2040
It's not quite done, but - more coding to do, but I've been working on getting HP's first pocket calculator running as an emulator on the Adafruit Macropad RP2040 keypad. The bulk of this code comes from an Instructables project where enurdag emulated a HP-35 RPN calculator with an Arduino and a TFTLCD touchscreen shield. Very cool!
The HP-35 has 35 keys, the macropad has 9, so I am using double clicks to access the more used features (arbitrarily chosen by me), and am using the rotary encoder to access everything else. Also, there is a USB input mode (entered by double clicking the encoder button) where you can turn the Macropad into what it was more intended to be, a computer interface - currently a number pad with the enter key.
I've abstracted the HP-35 core that enurdag created / adapted? into it's own Arduino library - so you should be able to use that in projects other than this one...
Also, I'm using Platformio for my dev stack - I prefer it far more than the Arduino IDE, but it does come with it's quirks... in this project, I had to make accommodations for the Raspberry Pi core that Platformio uses (VS the one that Adafruit uses) - if you're digging into the code, that may be one of the really weird things you notice - the others being my total mis-understanding of C and C++...
- Created my own 7-segment font using this tool.
- legends for relegendable caps
- Images were converted with this tool
BOM
HP 35 calculator links...
- HP-35 Scientific Calculator Emulator With Arduino Uno: https://www.instructables.com/member/enurdag/
- About the HP-35: https://en.wikipedia.org/wiki/HP-35 - http://www.jacques-laporte.org/HP203520Saga.htm
- A HP-35 simulator (emulator?): https://www.hpmuseum.org/simulate/hp35sim/hp35sim.htm
- Reverse engineering the HP-35 ROM based on a photo of the physical chip - really cool!: http://www.pmonta.com/calculators/hp-35/
- HP Calculator microassembler and simulator: http://www.brouhaha.com/~eric/software/casmsim/ - replaced by https://nonpareil.brouhaha.com
- Some general cool info about the HP-35: https://www.keesvandersanden.nl/calculators/hp35.php
- HP-35 ROM: http://home.citycable.ch/pierrefleur/Jacques-Laporte/HP35%20ROM.htm